{"ast":null,"code":"import _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport EllipsisOutlined from \"@ant-design/icons/es/icons/EllipsisOutlined\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Button from '../button';\nimport { ConfigContext } from '../config-provider';\nimport { useCompactItemContext } from '../space/Compact';\nimport Dropdown from './dropdown';\nimport Space from '../space';\nimport useStyle from './style';\nvar DropdownButton = function DropdownButton(props) {\n  var _React$useContext = React.useContext(ConfigContext),\n    getContextPopupContainer = _React$useContext.getPopupContainer,\n    getPrefixCls = _React$useContext.getPrefixCls,\n    direction = _React$useContext.direction;\n  var customizePrefixCls = props.prefixCls,\n    _props$type = props.type,\n    type = _props$type === void 0 ? 'default' : _props$type,\n    danger = props.danger,\n    disabled = props.disabled,\n    loading = props.loading,\n    onClick = props.onClick,\n    htmlType = props.htmlType,\n    children = props.children,\n    className = props.className,\n    menu = props.menu,\n    arrow = props.arrow,\n    autoFocus = props.autoFocus,\n    overlay = props.overlay,\n    trigger = props.trigger,\n    align = props.align,\n    open = props.open,\n    onOpenChange = props.onOpenChange,\n    placement = props.placement,\n    getPopupContainer = props.getPopupContainer,\n    href = props.href,\n    _props$icon = props.icon,\n    icon = _props$icon === void 0 ? /*#__PURE__*/React.createElement(EllipsisOutlined, null) : _props$icon,\n    title = props.title,\n    _props$buttonsRender = props.buttonsRender,\n    buttonsRender = _props$buttonsRender === void 0 ? function (buttons) {\n      return buttons;\n    } : _props$buttonsRender,\n    mouseEnterDelay = props.mouseEnterDelay,\n    mouseLeaveDelay = props.mouseLeaveDelay,\n    overlayClassName = props.overlayClassName,\n    overlayStyle = props.overlayStyle,\n    destroyPopupOnHide = props.destroyPopupOnHide,\n    dropdownRender = props.dropdownRender,\n    restProps = __rest(props, [\"prefixCls\", \"type\", \"danger\", \"disabled\", \"loading\", \"onClick\", \"htmlType\", \"children\", \"className\", \"menu\", \"arrow\", \"autoFocus\", \"overlay\", \"trigger\", \"align\", \"open\", \"onOpenChange\", \"placement\", \"getPopupContainer\", \"href\", \"icon\", \"title\", \"buttonsRender\", \"mouseEnterDelay\", \"mouseLeaveDelay\", \"overlayClassName\", \"overlayStyle\", \"destroyPopupOnHide\", \"dropdownRender\"]);\n  var prefixCls = getPrefixCls('dropdown', customizePrefixCls);\n  var buttonPrefixCls = \"\".concat(prefixCls, \"-button\");\n  var _useStyle = useStyle(prefixCls),\n    _useStyle2 = _slicedToArray(_useStyle, 2),\n    wrapSSR = _useStyle2[0],\n    hashId = _useStyle2[1];\n  var dropdownProps = {\n    menu: menu,\n    arrow: arrow,\n    autoFocus: autoFocus,\n    align: align,\n    disabled: disabled,\n    trigger: disabled ? [] : trigger,\n    onOpenChange: onOpenChange,\n    getPopupContainer: getPopupContainer || getContextPopupContainer,\n    mouseEnterDelay: mouseEnterDelay,\n    mouseLeaveDelay: mouseLeaveDelay,\n    overlayClassName: overlayClassName,\n    overlayStyle: overlayStyle,\n    destroyPopupOnHide: destroyPopupOnHide,\n    dropdownRender: dropdownRender\n  };\n  var _useCompactItemContex = useCompactItemContext(prefixCls, direction),\n    compactSize = _useCompactItemContex.compactSize,\n    compactItemClassnames = _useCompactItemContex.compactItemClassnames;\n  var classes = classNames(buttonPrefixCls, compactItemClassnames, className, hashId);\n  if ('overlay' in props) {\n    dropdownProps.overlay = overlay;\n  }\n  if ('open' in props) {\n    dropdownProps.open = open;\n  }\n  if ('placement' in props) {\n    dropdownProps.placement = placement;\n  } else {\n    dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight';\n  }\n  var leftButton = /*#__PURE__*/React.createElement(Button, {\n    type: type,\n    danger: danger,\n    disabled: disabled,\n    loading: loading,\n    onClick: onClick,\n    htmlType: htmlType,\n    href: href,\n    title: title\n  }, children);\n  var rightButton = /*#__PURE__*/React.createElement(Button, {\n    type: type,\n    danger: danger,\n    icon: icon\n  });\n  var _buttonsRender = buttonsRender([leftButton, rightButton]),\n    _buttonsRender2 = _slicedToArray(_buttonsRender, 2),\n    leftButtonToRender = _buttonsRender2[0],\n    rightButtonToRender = _buttonsRender2[1];\n  return wrapSSR( /*#__PURE__*/React.createElement(Space.Compact, Object.assign({\n    className: classes,\n    size: compactSize,\n    block: true\n  }, restProps), leftButtonToRender, /*#__PURE__*/React.createElement(Dropdown, Object.assign({}, dropdownProps), rightButtonToRender)));\n};\nDropdownButton.__ANT_BUTTON = true;\nexport default DropdownButton;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","EllipsisOutlined","classNames","React","Button","ConfigContext","useCompactItemContext","Dropdown","Space","useStyle","DropdownButton","props","useContext","getContextPopupContainer","getPopupContainer","getPrefixCls","direction","customizePrefixCls","prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","href","icon","createElement","title","buttonsRender","buttons","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender","restProps","buttonPrefixCls","wrapSSR","hashId","dropdownProps","compactSize","compactItemClassnames","classes","leftButton","rightButton","leftButtonToRender","rightButtonToRender","Compact","assign","size","block","__ANT_BUTTON"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/dropdown/dropdown-button.js"],"sourcesContent":["var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport EllipsisOutlined from \"@ant-design/icons/es/icons/EllipsisOutlined\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Button from '../button';\nimport { ConfigContext } from '../config-provider';\nimport { useCompactItemContext } from '../space/Compact';\nimport Dropdown from './dropdown';\nimport Space from '../space';\nimport useStyle from './style';\nconst DropdownButton = props => {\n  const {\n    getPopupContainer: getContextPopupContainer,\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const {\n      prefixCls: customizePrefixCls,\n      type = 'default',\n      danger,\n      disabled,\n      loading,\n      onClick,\n      htmlType,\n      children,\n      className,\n      menu,\n      arrow,\n      autoFocus,\n      overlay,\n      trigger,\n      align,\n      open,\n      onOpenChange,\n      placement,\n      getPopupContainer,\n      href,\n      icon = /*#__PURE__*/React.createElement(EllipsisOutlined, null),\n      title,\n      buttonsRender = buttons => buttons,\n      mouseEnterDelay,\n      mouseLeaveDelay,\n      overlayClassName,\n      overlayStyle,\n      destroyPopupOnHide,\n      dropdownRender\n    } = props,\n    restProps = __rest(props, [\"prefixCls\", \"type\", \"danger\", \"disabled\", \"loading\", \"onClick\", \"htmlType\", \"children\", \"className\", \"menu\", \"arrow\", \"autoFocus\", \"overlay\", \"trigger\", \"align\", \"open\", \"onOpenChange\", \"placement\", \"getPopupContainer\", \"href\", \"icon\", \"title\", \"buttonsRender\", \"mouseEnterDelay\", \"mouseLeaveDelay\", \"overlayClassName\", \"overlayStyle\", \"destroyPopupOnHide\", \"dropdownRender\"]);\n  const prefixCls = getPrefixCls('dropdown', customizePrefixCls);\n  const buttonPrefixCls = `${prefixCls}-button`;\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const dropdownProps = {\n    menu,\n    arrow,\n    autoFocus,\n    align,\n    disabled,\n    trigger: disabled ? [] : trigger,\n    onOpenChange,\n    getPopupContainer: getPopupContainer || getContextPopupContainer,\n    mouseEnterDelay,\n    mouseLeaveDelay,\n    overlayClassName,\n    overlayStyle,\n    destroyPopupOnHide,\n    dropdownRender\n  };\n  const {\n    compactSize,\n    compactItemClassnames\n  } = useCompactItemContext(prefixCls, direction);\n  const classes = classNames(buttonPrefixCls, compactItemClassnames, className, hashId);\n  if ('overlay' in props) {\n    dropdownProps.overlay = overlay;\n  }\n  if ('open' in props) {\n    dropdownProps.open = open;\n  }\n  if ('placement' in props) {\n    dropdownProps.placement = placement;\n  } else {\n    dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight';\n  }\n  const leftButton = /*#__PURE__*/React.createElement(Button, {\n    type: type,\n    danger: danger,\n    disabled: disabled,\n    loading: loading,\n    onClick: onClick,\n    htmlType: htmlType,\n    href: href,\n    title: title\n  }, children);\n  const rightButton = /*#__PURE__*/React.createElement(Button, {\n    type: type,\n    danger: danger,\n    icon: icon\n  });\n  const [leftButtonToRender, rightButtonToRender] = buttonsRender([leftButton, rightButton]);\n  return wrapSSR( /*#__PURE__*/React.createElement(Space.Compact, Object.assign({\n    className: classes,\n    size: compactSize,\n    block: true\n  }, restProps), leftButtonToRender, /*#__PURE__*/React.createElement(Dropdown, Object.assign({}, dropdownProps), rightButtonToRender)));\n};\nDropdownButton.__ANT_BUTTON = true;\nexport default DropdownButton;"],"mappings":";AAAA,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC;IAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,C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